<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //map，类似Java中的流式编程
    let arr=[1,2,3,4];
    arr=arr.map((item) => {
        return item*2;
    });
    console.log(arr);

    //* reduce
    
</script>
</html>